package com.szqhyxj.youxiangju.biz.core;

import android.content.SharedPreferences;

/**
 * Created by leung on 2019/3/13.
 */

public class SharedPreferencesUtil {
    public static final String GUIDER = "guider";
    private static final String HOMESHOW = "homeshow";
    private static final String MYSHOW = "myshow";
    private static final String RECEIPTSHOW = "ReceiptShow";
    private static final String REPAYMENTSHOW ="RepaymentShow";
    private static final String ONLINECHANNELLISTSHOW = "OnlineChannelListShow";


    private static SharedPreferences.Editor editor;
    private static SharedPreferences shared;

    static {
        shared = App.getApplication().getApplicationContext().getSharedPreferences(GUIDER, 0);
        editor = shared.edit();
    }

    /**
     * 首页引导页是否显示过
     *
     * @return
     */
    public static boolean getHomeShow() {
        boolean isShow = shared.getBoolean(HOMESHOW, false);
        return isShow;
    }


    public static void setHomeshow(boolean isShow) {
        editor.putBoolean(HOMESHOW, isShow);
        editor.commit();
    }

    /**
     * 我的页面引导页是否显示过
     *
     * @return
     */
    public static boolean getMyShow() {
        boolean isShow = shared.getBoolean(MYSHOW, false);
        return isShow;
    }


    public static void setMyshow(boolean isShow) {
        editor.putBoolean(MYSHOW, isShow);
        editor.commit();
    }

    /**
     * 收款引导页是否显示过
     *
     * @return
     */
    public static boolean getReceiptShow() {
        boolean isShow = shared.getBoolean(RECEIPTSHOW, false);
        return isShow;
    }


    public static void setReceiptShow(boolean isShow) {
        editor.putBoolean(RECEIPTSHOW, isShow);
        editor.commit();
    }

    /**
     * 还款引导页是否显示过
     *
     * @return
     */
    public static boolean getRepaymentShow() {
        boolean isShow = shared.getBoolean(REPAYMENTSHOW, false);
        return isShow;
    }


    public static void setRepaymentShow(boolean isShow) {
        editor.putBoolean(REPAYMENTSHOW, isShow);
        editor.commit();
    }
    /**
     * 选择通道引导页是否显示过
     *
     * @return
     */
    public static boolean getOnlineChannelListShowShow() {
        boolean isShow = shared.getBoolean(ONLINECHANNELLISTSHOW, false);
        return isShow;
    }


    public static void setOnlineChannelListShowShow(boolean isShow) {
        editor.putBoolean(ONLINECHANNELLISTSHOW, isShow);
        editor.commit();
    }



}
